<!DOCTYPE html>
<html>
<head>
	<meta charset="utf-8">
	<title>Math数学对象</title>
	<script type="text/javascript">
	//求两个整数之间的随机整数
    //定义随机数的函数	
    function getRandom(min,max){
    	//求随机数
    	var random = Math.random()*(max-min)+min;
    	//向下取整
    	random = Math.floor(random);
    	//输出结果
    	document.write(random+"<hr>");
    }
    //调用函数
    getRandom(0,100);
    getRandom(5,89);
    getRandom(100,199);

    //随机网页背景色
    var min = 100000;
    var max = 999999;
    var random = Math.random()*(max-min)+min;
    //向下取整
    random = Math.floor(random);
    document.body.bgColor = "#"+random;
	</script>
</head>
<body>

</body>
</html>